#include "LightMgr.h"
#include <algorithm>

LightMgr* s_instance = NULL;
LightMgr* LightMgr::getInstance(){
	if (!s_instance)
	{
		s_instance = new LightMgr();
	}
	return s_instance;
}

LightMgr::LightMgr(void)
{
}


LightMgr::~LightMgr(void)
{
}

void LightMgr::addLight( LightBase* light )
{
	lights.push_back(light);
}

void LightMgr::getColor( Vec3& pixelPos,Vec3& normal,COLOR& color )
{
	for (vector<LightBase*>::iterator itr = lights.begin();itr != lights.end(); ++itr)
	{
			(*itr)->calcColor(pixelPos,normal,color);
	}
}
